package com.cvit.cn.service;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cvit.cn.bean.Acceptance;
import com.cvit.cn.dao.AcceptanceMapper;

/**
 * 连表查询
 * @author 412
 *
 */

@Service
public class AcceptanceService {
	@Autowired
	AcceptanceMapper acceptanceMapper;

	@Autowired
	HttpServletRequest request;
	
	/*
	 * 关联查询数据
	 */
	public List<Map<String, Object>> selectAcceptanceDatas() {
		return acceptanceMapper.selectAcceptanceDatas();
	}

	/*
	 * 假删除
	 */
	public int delAcceptanceFalse(String[] ids) {
		return acceptanceMapper.delAcceptanceFalse(ids);
	}
	
	/*
	 * 批量插入
	 */
	public void addDatas(Acceptance acceptance) {
		acceptanceMapper.insert(acceptance);
	}

	/*
	 * 按供应商id查询关联表
	 */
	public List<Map<String, Object>> selectAcceptanceById(String id) {
		return acceptanceMapper.selectAcceptanceById(id);
	}

}
